From 3310ae17fd5484afa292b12665c460a104e0d2f4 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 7 Feb 2007 00:39:48 +0000 Subject: [PATCH] linux: Zap /proc/interrupts count when a dynamic IRQ is unbound. Signed-off-by: Keir Fraser --- linux-2.6-xen-sparse/drivers/xen/core/evtchn.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c b/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c index 51436b69cc..3e66f3be45 100644 --- a/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c +++ b/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c @@ -424,7 +424,7 @@ static int bind_ipi_to_irq(unsigned int ipi, unsigned int cpu) static void unbind_from_irq(unsigned int irq) { struct evtchn_close close; - int evtchn = evtchn_from_irq(irq); + int cpu, evtchn = evtchn_from_irq(irq); spin_lock(&irq_mapping_update_lock); @@ -452,6 +452,10 @@ static void unbind_from_irq(unsigned int irq) evtchn_to_irq[evtchn] = -1; irq_info[irq] = IRQ_UNBOUND; + + /* Zap stats across IRQ changes of use. */ + for_each_possible_cpu(cpu) + kstat_cpu(cpu).irqs[irq] = 0; } spin_unlock(&irq_mapping_update_lock); -- 2.30.2